package com.redStudio.queryTest.modal;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class MondataHourPk implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -8607875205700357378L;

	@Column(name="time")
	private Date time;
	
	@Column(name="data_type_id")
	private int data_type_id;

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public int getData_type_id() {
		return data_type_id;
	}

	public void setData_type_id(int data_type_id) {
		this.data_type_id = data_type_id;
	}
	
	
    public int hashCode() {
    	
        return (int) time.hashCode() + data_type_id;
    }

    public boolean equals(Object obj) {
        if (obj == this) return true;
        if (!(obj instanceof MondataHourPk)) return false;
        if (obj == null) return false;
        MondataHourPk pk = (MondataHourPk) obj;
        return pk.data_type_id == data_type_id && pk.time.equals(time);
    }	
	
}



